<?php  
header("content-type:text/html;charset=utf-8");
?> 
<!doctype html>
<html lang="zh-cn">
 <head>
  <meta charset="UTF-8">  
  <title>菜系</title>
 </head>
 <body>
 
 <?php  $sql="select * from videotype"; 
$row = mysql_query($sql);
 ?> 
 <center><h3>菜系列表</h3></center>
 <table align="center" width="80%" border=1> 
 <tr>
   <th>菜谱名</th>   
   <th>操作 <a href="admin.php?c=cx&m=form">添加</a></th>
 </tr>

 <?php

  foreach ($data['videotype'] as $row) {
	 echo '<tr>';
	 echo '<td>'.$row['typename'].'</td>';	 
	 echo '<td>
   <a href="ind.php?c=cx&m=cxform">添加</a> |'.
   '<a href="ind.php?c=cx&m=cxedit&id='.$row['id'].' ">修改</a> | 
	 <a href="ind.php?c=cx&m=delcx&id='.$row['id'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
	 echo '</tr>';  
  }
  echo '</table>';  
  
  $totalrows = count($data['food']);
  echo "<table align='center'><tr><td>共有{$totalrows}种菜系</td></tr></table>"; 
 ?>
 </body>
</html>